<html lang="zh-cn" xmlns：th="http://www.thymeleaf.org" xmlns:th="http://www.w3.org/1999/xhtml">
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>关于我们管理</title>
        <!-- Bootstrap 3.3.7 -->
        <link rel="stylesheet" href="admin/bower_components/bootstrap/dist/css/bootstrap.min.css"
              th:href="@{/admin/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    </head>
    <body>

        <table class="table table-hover">
            <thead>
                <tr colspan="5">
                    <th><a class="btn btn-primary btn-lg active"
                           th:href="@{/admin/toEditMenu}">添加数据</a></th>
                </tr>
                <tr>
                    <th width="100px">#</th>
                    <th>菜单名称</th>
                    <th>url</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr th:each="menu:${menuList}">
                    <td th:text="${menu.id}"></td>
                    <td th:text="${menu.name}"></td>

                <td th:text="${menu.url}"></td>
                <td>
                    <a href="toEditMenu?id=${menu.id}" th:href="@{/admin/toEditMenu(id=${menu.id})}"
                       style="margin-right: 5px;">
                        <span class="glyphicon glyphicon-pencil"></span>
                    </a>
                    <a href="deleteMenu?id=${menu.id}" th:href="@{/admin/deleteMenu(id=${menu.id})}" onclick="return confirm('是否要真的删除？')">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </a>
                </td>
                </tr>
            </tbody>
        </table>
        <div style="float: right;padding-right: 150px;">

            当前 <span th:text="${pageInfo.pageNum}"></span> 页,总 <span
                th:text="${pageInfo.pages}"></span> 页,共 <span
                th:text="${pageInfo.total}"></span> 条记录

        </div><br>
        <ul class="pagination" style="float: right;padding-right: 100px;">
            <li><a th:href="@{/admin/menuList}">第一页</a></li>
            <li><a th:href="@{/admin/menuList(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a></li>
            <li>
                <a th:href="@{/admin/menuList(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
            </li>
            <li><a th:href="@{/admin/menuList(pageNum=${pageInfo.pages})}">最后一页</a></li>
        </ul>
    </body>
</html>
